<template>
  <view class="proto-list-wrapper">
    <view v-for="item in items" :key="item.id">
      <proto-card :item="item" @item-click="handleItemClick" />
    </view>
  </view>
</template>
<script lang="ts">
export default {
  name: 'ProtoList',
};
</script>
<script setup lang="ts">
import './index.less';
import { PropType, ref } from 'vue';
import { ProtoType } from '@/api/proto';
import ProtoCard from '@/components/proto-card/index.vue';

const props = defineProps({
  items: {
    type: Array as PropType<ProtoType[]>,
    default: () => {
      return [];
    },
  },
});
const emit = defineEmits(['item-click']);

const handleItemClick = (item) => {
  emit('item-click', item);
};
</script>
